/*
 *  This file is part of Fax .NET.
 *
 *  Fax .NET is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation.
 * 
 *  Fax .NET is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 * 
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with Fax .NET.  If not, see <http://www.gnu.org/licenses/>.
 */

using System;
using System.Runtime.Serialization;

namespace Tourreau.Gilles.FaxDotNet
{
    /// <summary>
    /// Exception throwed in the Fax .NET library.
    /// </summary>
    [Serializable]
    public class FaxException : Exception
    {
        /// <summary>
        /// Create an exception instance with a message.
        /// </summary>
        /// <param name="message">Message of the exception.</param>
        public FaxException(string message)
            : base(message)
        {

        }

        /// <summary>
        /// Create an exception instance containing an inner exception.
        /// </summary>
        /// <param name="message">Message of the exception.</param>
        /// <param name="innerException">Inner exception attached with the FaxException.</param>
        /// <remarks>Lot of exceptions are generate by a error in native function calls.
        /// The <paramref name="innerException"/> is often filled with a <see cref="System.ComponentModel.Win32Exception"/>.</remarks>
        public FaxException(string message, Exception innerException)
            : base(message, innerException)
        {

        }

        /// <overloads></overloads>
        protected FaxException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {

        }
    }
}
